const install = (Vue, vm) => {
	// 此处没有使用传入的params参数
	let login = (params = {}) => vm.$u.get('', {
		method: 'login',
		params: `${params.username},${params.password}`
	});

	let getSummaryInfo = (params = {}) => vm.$u.get('', {
		method: 'jsonJkRunInfo',
		params: vm.vuex_user.roleId
	});

	let getChartInfo = (params = {}) => vm.$u.get('', {
		method: 'jsonJKDLChartData',
		params: `${vm.vuex_user.roleId},${params.date}`
	});

	let getStationList = (params = {}) => vm.$u.get('', {
		method: 'jsonRoleStationListEx',
		params: vm.vuex_user.roleId
	});

	let getStationChartInfo = (params = {}) => vm.$u.get('', {
		method: 'jsonQZFDL',
		params: `${params.stationId},${params.date}`
	});

	// 逆变器电量api
	let getDeviceChartInfo = (params = {}) => vm.$u.get('', {
		method: 'getNBQFDL_Ex',
		params: `${params.deviceId},${params.date}`
	});

	//设备信息-逆变器信息
	let getDeviceList = (params = {}) => vm.$u.get('', {
		method: 'jsonNBQList',
		params: `${params.stationId}`
	});

	//查询告警通知结果(遥信类告警)
	let getWarning = (params = {}) => vm.$u.get('', {
		method: 'jsonValueOfID',
		params: `${params.id}`
	});

	//查询告警通知结果
	let getWarningAlarm = (params = {}) => vm.$u.get('', {
		method: 'jsonAlarmStatus',
		params: `${params.id},${params.type}`
	});




	//遥信告警列表(总站)
	let getYxGjListForAll = (params = {}) => vm.$u.get('', {
		method: 'jsonJKYXGJTableData',
		params: vm.vuex_user.roleId
	});
	//遥信告警列表(站点)
	let getYxGjListForStation = (params = {}) => vm.$u.get('', {
		method: 'jsonSSYXGJ',
		params: params.stationId
	});

	//通讯告警列表(总站)
	let getTxgjListForAll = (params = {}) => vm.$u.get('', {
		method: 'jsonJKTXGJTableData',
		params: vm.vuex_user.roleId
	});

	//通讯告警列表(站点)
	let getTxgjListForStation = (params = {}) => vm.$u.get('', {
		method: 'jsonSSTXGJ',
		params: params.stationId
	});

	//连接告警列表(总站)
	let getLjgjListForAll = (params = {}) => vm.$u.get('', {
		method: 'jsonJKLJGJTableData',
		params: vm.vuex_user.roleId
	});


	//连接告警列表(站点)
	let getLjgjListForStation = (params = {}) => vm.$u.get('', {
		method: 'jsonSSLJGJ',
		params: params.stationId
	});



	//逆变器参数信息
	let getDeviceParam = (params = {}) => vm.$u.get('', {
		method: 'jsonNBQYCXX',
		params: `${params.equipmentId}`
	});

	//逆变器遥信信息
	let getDeviceYx = (params = {}) => vm.$u.get('', {
		method: 'jsonNBQYXXX',
		params: `${params.equipmentId}`
	});

	//逆变器遥脉信息
	let getDeviceYm = (params = {}) => vm.$u.get('', {
		method: 'jsonNBQYMXX',
		params: `${params.equipmentId}`
	});





	vm.$u.api = {
		login,
		getSummaryInfo,
		getChartInfo,
		getStationList,
		getStationChartInfo,
		getDeviceChartInfo,
		getDeviceList,
		getWarning,
		getWarningAlarm,
		getYxGjListForAll,
		getYxGjListForStation,
		getTxgjListForAll,
		getTxgjListForStation,
		getLjgjListForAll,
		getLjgjListForStation,

		getDeviceParam,
		getDeviceYx,
		getDeviceYm
	};
}

export default {
	install
}
